package org.tity.commons.code;

import static org.junit.Assert.assertTrue;

import java.io.File;

import org.junit.Test;
import org.tity.commons.concurrent.ThreadUtil;
import org.tity.commons.environment.PathTool;
import org.tity.commons.io.EasyFile;

 

public class CompressTest {
	
 
	

	@Test
	public void test_compress_js() throws Exception {

		String in = PathTool.getDir(CompressTest.class).resolve("TityGrid.js").getAbsolutePath();
		
		EasyFile dir=PathTool.getDir(CompressTest.class);
		String out=EasyFile.createTempFile("TityGrid-", ".js",dir.file()).getAbsolutePath();

		
		JSCompressor.compress(in, out);
		System.out.println();
 
		File f=new File(out);
 
		assertTrue(f.exists());
		assertTrue(f.length()>0);
		
	}

}
